import actionTypes from 'constant/actionTypes';
const {ACTION_GET_USER_INFO} = actionTypes;
import {get} from 'common/fetch';
import {USER_INFO_URL} from 'constant/url';
export function fetchUserInfo() {
  return dispatch => {
    return get(USER_INFO_URL).then(res => {
      if (res) {
        let userInfo = res[0];
        dispatch({
          type: ACTION_GET_USER_INFO,
          payload: userInfo,
        });
      }
    });
  };
}
